package duixiang.xuesheng;

import java.util.Scanner;

/**
 * @author げっしょく
 * @date 2021/7/4
 */
public class Test01 {
    public static String Append(int[] arr){
        StringBuilder sb = new StringBuilder("[");
        for (int i = 0; i < arr.length; i++) {
            if(i==arr.length-1){
                sb.append(arr[i]+"]");
            }else{
                sb.append(arr[i]).append(" ,");
            }
        }
        String s1 = sb.toString();
        return s1;
    }
    public static void main(String[] args){
        int[] arr = {1,2,3};
        String append = Append(arr);
         System.out.println(append);
    }


}
/*       Scanner sc = new Scanner(System.in);
        String s1 = sc.next();
        StringBuilder sb = new StringBuilder(s1);
        StringBuilder sb2 = sb.reverse();
        String s2 = sb2.toString();
        if(s1.equals(s2)){
            System.out.println("您输入的是对称字符串");
        }else{
            System.out.println("您输入的字符串不是对称字符串");
        }*/



/*Scanner sc = new Scanner(System.in);
        String s1 = sc.next();
        String[] nameAndage = s1.split("，");   //根据逗号切割字符串的到有用信息
//        System.out.println(nameAndage[0]);
//        System.out.println(nameAndage[1]);
        String s2 = nameAndage[0];
        String s3 = nameAndage[1];
        Studen stu1 = new Studen(s2 , s3);
        System.out.println(stu1.getAge());
        System.out.println(stu1.getName());*/




/*Studen s1 = new Studen();
        Studen s2 = new Studen("周震", 21 , 250);
        s1.show();
        s2.show();
        s1.sexAge(-1);
        s2.sexAge(101);
        System.out.println(s1.getAge());
        System.out.println(s2.getAge());
        s1.show();
        s2.show();*/


  /*public static void main(String[] args) {
        Studen stu = new Studen();
        stu.name = "周震";
        stu.age = 21;
        int[] arr ={7,9,4,8,6,4,7,8,9};

        stu.xuehao = arr;
        arr[0]=0;
        System.out.println(stu.name);
        System.out.println(stu.age);
        for(int i=0;i<stu.xuehao.length;i++){
            System.out.print(stu.xuehao[i]);
        }
        stu.studen();
    }*/